package com.gvitz.transaction.utils;

import com.gvitz.transaction.fragments.CardsFragment;
import com.gvitz.transaction.fragments.MapaFragment;
import com.gvitz.transaction.fragments.PaymentFragment;
import com.gvitz.transaction.fragments.TransactionsFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
 
public class ViewPagerAdapter extends FragmentPagerAdapter {
 
    // Declare the number of ViewPager pages
    final int PAGE_COUNT = 4;
 
    public ViewPagerAdapter(FragmentManager fm) {
        super(fm);
    }
 
    @Override
    public Fragment getItem(int arg0) {
        switch (arg0) {
        
        case 0:
        	MapaFragment fragmentMap = new MapaFragment();
            return fragmentMap;
 
        case 1:
        	PaymentFragment fragmentPay = new PaymentFragment();
            return fragmentPay;
        case 2:
        	CardsFragment fragmentCard = new CardsFragment();
            return fragmentCard;
        case 3:
        	TransactionsFragment fragmentTrans = new TransactionsFragment();
            return fragmentTrans;

        }
        return null;
    }
 
    @Override
    public int getCount() {
        // TODO Auto-generated method stub
        return PAGE_COUNT;
    }
 
}
